<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    //try catch用于捕获异常

    //如果try里面出错了,那么就会走到catch

    //使用try catch的好处就是不会阻塞代码的执行


    console.log(123)
    try {
        a+3
    }catch(e){
        console.log(e);
        
    }
    console.log(456)

    console.log(789);
    
</script>